package com.bng8.superstar_cms.domain.common;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * ClassName: GenderType
 * Package: com.bng8.superstar_cms.domain.common
 * Date: 2023/8/15 10:44
 * Author: 安知（13921877634）
 */
@AllArgsConstructor
@Getter
public enum GenderType {
    WOMEN(2, "女"),
    MAN(1, "男"),
    SECRET(0, "保密");

    /**
     * 数据库中存的值
     */
    @EnumValue
    private Integer key;

    /**
     * 返回前端的值
     */
    @JsonValue
    private String name;
}
